<template>
	<view class="center-column mt64">
		<view v-for="(item,index) in actions" :key="index">
			<u-cell icon="phone" :border="false" :title="item.phone" @click="tap(index)"></u-cell>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				actions: [{phone:"13800000000"}],
			}
		},
		created() {
		
		},
		mounted() {
			
		},
		onReady() {
			
		},
		onLoad(e) {
			
		},
		onShow() {
			this._reqConfig()
		},
		onShareAppMessage(e) {
			
		},
		methods: {
			async _reqConfig() {
				// https://www.yuque.com/apifm/nu0f75/udrcag
				const res = await this.$wxapi.config(this.token,'phones')
				if (res.code == 0) {
					const arr=JSON.parse(res.data.value);
					this.actions=arr
				}
			},
			tap(index) {
				uni.makePhoneCall({
					phoneNumber: this.actions[index].phone
				})
			},
		}
	}
</script>
<style scoped lang="scss">

</style>
